<template>
  <van-popup
    v-bind="$attrs"
    get-container="body"
    :close-on-click-overlay="false"
    :overlay-style="overlayStyle"
    :style="popupStyle"
  >
    <div class="lack-baby-modal-wrapper">
      <p>{{ CONSTANTS.LABEL_BABYMODAL_TITAL }}</p>
      <p>{{ CONSTANTS.LABEL_BABYMODAL_CONTENT }}</p>
      <button @click="onAddBaby">
        {{ CONSTANTS.LABEL_BABYMODAL_ADDBABY }}
      </button>
    </div>
  </van-popup>
</template>
<script>
import * as CONSTANTS from '@/constants/index'

export default {
  props: {},
  components: {},
  data() {
    return {
      CONSTANTS: Object.freeze(CONSTANTS),
      popupStyle: {
        'background-color': 'transparent',
      },
      overlayStyle: {
        'background-color': 'rgba(0,0,0,0.25)',
      },
    }
  },
  computed: {},
  mounted() {},
  filters: {},
  watch: {},
  methods: {
    onAddBaby() {
      this.$emit('close')
    },
  },
}
</script>

<style lang="less" scoped>
.lack-baby-modal-wrapper {
  width: 271px;
  height: 171px;
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
  & > p {
    margin: 0;
  }
  & > p:first-of-type {
    padding-top: 28px;
    height: 17px;
    font-family: 'SourceHanSansCN-Regular';
    font-size: 17px;
    font-weight: normal;
    font-stretch: normal;
    letter-spacing: 0px;
    color: rgba(0, 0, 0, 0.8);
    text-align: center;
  }

  & > p:nth-of-type(2) {
    padding: 0 23px;
    margin-top: 12px;
    line-height: 18px;
    font-family: 'SourceHanSansCN-Regular';
    font-size: 14px;
    font-weight: normal;
    font-stretch: normal;
    line-height: 18px;
    letter-spacing: 0px;
    color: rgba(0, 0, 0, 0.5);
  }

  & > button:last-of-type {
    width: 100%;
    height: 45px;
    margin-top: 31px;
    font-family: 'SourceHanSansCN-Regular';
    font-size: 17px;
    font-weight: normal;
    font-stretch: normal;
    letter-spacing: 0px;
    color: #007aff;
    border: 0;
    outline: 0;
    background-color: #fff;
    border-top: 1px solid #d8d8d8;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}
</style>
